import { controller, get, post } from "../decorator";
import type Application from "koa";
import type Router from "koa-router";

export type CtxType = Application.ParameterizedContext<any, Router.IRouterParamContext<any, {}>, any>;

@controller("auth")
export default class Auth {

    @get("/login")
    login() {
        return "login";
    }

    @post("/register")
    register() {
        return "register"
    }


    @post("/user")
    user(ctx: CtxType) {
        ctx.body = { id: 12, name: "test", sex: "男" }
    }
}